Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Rename symbols in TaskFieldRenderer #2440

Merged

Conversation

ilandikov
Copy link
Collaborator

@ilandikov ilandikov commented Nov 22, 2023

Description

Create TaskFieldRenderer class in TaskFieldRenderer.ts.

Rename:

  • FieldLayouts to TaskFieldRenderer
  • FieldLayoutDetail to TaskFieldHTMLData
  • FieldLayoutDetails to taskFieldHTMLData

Also:

  • TaskLineRenderer.taskToHtml() now calls li.dataset() directly instead of returning values to apply
    • This does make the structure of the code a lot clearer

Motivation and Context

Classes with names one can remember =)

How has this been tested?

Unit tests.

Types of changes

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)
  • Tests (prefix: test - additions and improvements to unit tests and the smoke tests)

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change has adequate Unit Test coverage.

Terms

@ilandikov
Copy link
Collaborator Author

FYI this PR contains only the changes we made together during our pairing.

@claremacrae claremacrae added type: internal Only regards development or contributing scope: rendering of tasks How the plugin displays tasks (except CSS issues) labels Nov 22, 2023
@claremacrae claremacrae changed the title refactor: create TaskFieldRenderer class refactor: Rename classes in TaskFieldRenderer Nov 22, 2023
@claremacrae claremacrae changed the title refactor: Rename classes in TaskFieldRenderer refactor: Rename symbols in TaskFieldRenderer Nov 22, 2023
@claremacrae
Copy link
Collaborator

Thanks for this... I've updated the title and description to say what we actually ended up doing...

@claremacrae claremacrae merged commit 2e26b69 into obsidian-tasks-group:main Nov 22, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: rendering of tasks How the plugin displays tasks (except CSS issues) type: internal Only regards development or contributing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants